package com.cash.channel.api.model.callback;

import com.cash.channel.api.model.cycle.AmountLimit;
import com.cash.channel.api.model.repay.TermOption;
import com.google.common.collect.Lists;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
public class ApplyAuditStatusCallBack implements Serializable {

    private String orderNo;

    private String channel;

    private Integer isCustom;

    private String status;

    private Long approveTime;

    private Integer minLoanAmt;

    private Integer maxLoanAmt;

    private Integer amtRange;


    private AmountLimit amountLimit;

    private List<TermOption> termOptions = Lists.newLinkedList();

    private String remark;

    public void addTermOption(Integer termId, String name, Integer term) {
        if (this.termOptions==null) {
            this.termOptions = Lists.newLinkedList();
        }
        this.termOptions.add(new TermOption(termId, name, term));
    }

}
